
/*
 * Hlpay-Plus aggregate payment system.
 * Copyright (c) 2024-2025 Hlpay Team Copyright has the right of final interpretation.
 */

package com.hlkj.pay.app.common;

import java.util.Map;

import com.hlkj.framework.common.pojo.CommonResult;
import com.hlkj.pay.dto.Base64Dto;
import com.hlkj.pay.dto.common.LocationDto;
import com.hlkj.pay.dto.common.ocr.OcrScan;
import com.hlkj.pay.dto.common.ocr.OcrScanResult;
import com.hlkj.pay.infrastructure.model.common.PlatFormConfigDO;
import com.hlkj.pay.vo.common.req.EmailSendReq;
import com.hlkj.pay.vo.common.req.SmsSendReq;
import com.hlkj.pay.vo.common.req.TestSendReq;
import com.hlkj.pay.vo.common.req.WechatSendReq;

/**
 * @author monk@techsun.com
 * @date 2023/04/25 14:30
 */
public interface ICommonAppService {

    /**
     * sendTest
     * 
     * @param testSendReq
     * @return
     */
    CommonResult<String> sendTest(TestSendReq testSendReq);

    /**
     * sendSms
     * 
     * @param smsSendReq
     * @return
     */
    CommonResult<String> sendSms(SmsSendReq smsSendReq);

    /**
     * sendEmail
     * 
     * @param emailSendReq
     * @return
     */
    CommonResult<String> sendEmail(EmailSendReq emailSendReq);

    /**
     * sendWechat
     * 
     * @param wechatSendReq
     * @return
     */
    CommonResult<String> sendWechat(WechatSendReq wechatSendReq);

    /**
     * ocrScan
     * 
     * @param ocrScan
     * @return
     */
    CommonResult<OcrScanResult> ocrScan(OcrScan ocrScan);

    /**
     * 系统配置
     * 
     * @return
     */
    Map<String, Object> sysConfig();

    /**
     *
     * @param platFormConfigDO
     */
    void saveOrUpdateConfig(PlatFormConfigDO platFormConfigDO);

    /**
     *
     * @param url
     * @return
     */
    CommonResult<String> urlToBase64(String url);

    /**
     *
     * @param address
     * @return
     */
    CommonResult<LocationDto> location(String address);

    /**
     *
     * @param base64
     * @return
     */
    CommonResult<String> base64ToUrl(Base64Dto base64);

    /**
     *
     * @param url
     * @return
     */
    CommonResult<String> qrCode(String url);
}
